# 1. 只能被继承不能实例化
from abc import abstractmethod, ABC


class Animal(ABC):
    def __init__(self, name):
        self.name = name

    @abstractmethod
    def eat(self):
        ...

class Dog(Animal):
    def sleep(self):
        print('sleep')

    def eat(self):
        print('吃吃吃')

dog = Dog('旺财')
dog.eat()
